package com.tataben.annotation;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * 注解入口
 * @author tataben
 */
public class VEAKit {

    private Annotation ann;
    private static VEAKit kit;
    private VEAKit () {
        ann = new Annotation();
    }
    public static synchronized VEAKit instance() {
        if (null == kit) {
            kit = new VEAKit();
        }
        return kit;
    }

    /**
     * Activity注解
     * @param activity
     */
    public void inject(Activity activity) {
        this.ann.inject(activity);
    }

    /**
     * 视图注解
     * @param view
     */
    public void inject(View view) {
        this.ann.inject(view);
    }

    /**
     * 视图注解
     * @param handler
     * @param view
     */
    public void inject(Object handler, View view) {
        this.ann.inject(handler, view);
    }

    /**
     * Fragment注解
     * @param fragment
     * @param inflater
     * @param container
     * @return
     */
    public View inject(Object fragment, LayoutInflater inflater, ViewGroup container) {
        return this.ann.inject(fragment, inflater, container);
    }

}